package org.ucas.kgraph.dto;

import com.alibaba.fastjson.JSON;
import com.google.common.base.Defaults;
import org.springframework.http.HttpStatus;
import org.ucas.kgraph.entity.Account;
import org.ucas.kgraph.entity.Perm;
import org.ucas.kgraph.entity.Term;
import org.ucas.kgraph.utils.exception.NotFoundException;

import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Array;
import java.sql.Date;
import java.util.Arrays;
import java.util.List;
import java.util.Map;


public class UserDto  {

  public Long id;

  public String name;
  
  public String com_name;
  
  public String com_id;
  
  public String reg_time;
  
  public String tele_num;
  
  public String role;
  
  public boolean state;
  
  public static UserDto oflist(Account account){
    UserDto userDto = new UserDto();
    userDto.id = account.getId();
    userDto.name=account.getUserProfile().getName();
    userDto.com_name=account.getUserProfile().getCompany().getCom_name();
    userDto.com_id=account.getUserProfile().getCompany().getCom_id();
    userDto.reg_time=account.getCreateAt().toString();
    userDto.tele_num = account.getName();
    userDto.role = account.getRolesName().toString();
    userDto.state=account.isDisabled();
    return userDto;
  }


public Long getId() {
	return id;
}



public void setId(Long id) {
	this.id = id;
}



public String getName() {
	return name;
}



public void setName(String name) {
	this.name = name;
}

 
}
